message queue
GraphicsDesigner combines these arguments into a complete message and places it in a message queue. Since it is built into GraphicsDesigner, the message queue is accessible by all programs.

GraphicsDesigner stores messages in the message queue until a program is ready to process them. Programs receive messages in the order they were put in the queue. First come, first served. Or in computer lingo, first-in, first-out, or FIFO.

Programs can add their own messages to the queue too. The message queue is a general purpose mechanism for one part of a program to communicate with another, even if the program creates no windows or graphics at all.

process message
Programs can call XgrPeekMessage() to extract a message from the queue, examine its arguments, and possibly call other functions and/or take actions in response.

  XgrPeekMessage ( @grid, @message, @v0, @v1, @v2, @v3, @r0, @r1 )
  XgrDeleteMessages ( 1 )

Then examine and take action based upon the arguments: grid, message, v0, v1, v2, v3, r0, r1.

Alternatively, programs can have GraphicsDesigner call the appropriate functions to process n messages by calling:

  XgrProcessMessages (n)